<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>密码修改 - 果果街</title>
<meta name="keywords"
	content="果果,果果街,果果网,童装, 淘宝网童装,儿童服装,儿童礼物,儿童美食,母婴用品,童装搭配,创意家居,玩具图书,亲子早教 " />
<%@include file="../../common/js.jsp" %>
<%@include file="../../common/css.jsp" %>
<script type="text/javascript" src="/js/jquery.Jcrop.js"></script>
<link type="text/css" rel="stylesheet" href="/css/v4/detail.css"/>
<!--[if ie 6]><script type="text/javascript" src="/js/v4/iepng.js"></script><![endif]-->
<!--[if ie]><link type="text/css" rel="stylesheet" href="/css/v4/common/IE.css"><![endif]-->
<style type="text/css">
	.validate_error{color: #f69; padding:0 0 0 10px;}
</style>
</head>
<body>

<%@include file="../../common/header.jsp"%>
<%@include file="../menu.jsp" %>
<div class="w100p pt20 pb35">
    	<div class="w980 mg clearfix">
        	<div class=" box_s6">
            	<div class="setting_box clearfix">
                    <div class=" home_185">
                    	<div class="setting_slide">
                        	<h3><i class="icon_setting"></i>账号设置</h3>
                            <ul>
                            	<li><a href="/member/personal.htm">基本信息</a></li>
                                <li><a href="/member/avatar.htm">修改头像</a></li>
                                <li class="current"><a href="/member/tosetpwd.htm">修改密码</a></li>
                            </ul>
                        </div>    
                    </div>
                    <div class="home_795">
                    	<div class="setting_det_box">
                            <div class="setting_det">
                             <form action="/member/setpwd.htm" method="post" id="setpwdForm">
                            	<ul class="info_form mt15">
                            		<c:if test="${not empty member.password }">
                                	<li>
                                    	<label class=" def_lbl">现在的密码：</label><input type="password" class="def_text_1 focus" name="oldpwd"/>
                                    </li>
                                    </c:if>
                                    <li>
                                    	<label class=" def_lbl">新的密码：</label><input type="password" class="def_text_1 focus" name="newpwd" id="newpwd"/>
                                    </li>
                                    <li>
                                    	<label class=" def_lbl">确认新的密码：</label><input type="password" class="def_text_1 focus" name="newpwdagain"/>
                                    </li>
                                    <li>
                                    	<input type="submit" class="def_btn_s5" value="确认修改" />
                                    </li>
                                </ul>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            	<div class="shadow"></div>
            </div>
        </div>
    </div>
<script type="text/javascript">
$(document).ready(function() {
	$("#setpwdForm").validate({
		errorClass:"validate_error",
		rules : {
			oldpwd : {required : true,minlength : 6,maxlength : 20},
			newpwd : {required : true,minlength : 6,maxlength : 20},
			newpwdagain : {required : true,equalTo:'#newpwd'}
		},
		messages : {
			oldpwd : {required : "请填写原密码",minlength : "密码长度为6～20位",maxlength : "密码长度为6～20位"},
			newpwd : {required : "请填写你的新密码",minlength : "密码长度为6～20位",maxlength : "密码长度为6～20位"},
			newpwdagain : {required : "请再次填写你的新密码",equalTo:"两次密码不一致"}
		},
		submitHandler:function(form) {
			$(form).ajaxSubmit(function(data){
				if(data=="success"){
					alert("修改成功");
				}else{
					alert("原密码不正确");
				}
			});
		}
	});
});

</script>
</body>
</html>